<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/view/taglib/common.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <title>文件上传界面</title>
	<%@ include file="/WEB-INF/view/taglib/header.jsp" %>
	<%@ include file="/WEB-INF/view/taglib/easyui.jsp" %>
	<%@ include file="/WEB-INF/view/taglib/layer.jsp" %>
	<%@ include file="/WEB-INF/view/taglib/uedit.jsp" %>
  </head>
  <body>
 	<div style="position:absolute;top:10px;left:20px;right:20px;bottom:10px;">
        <form id="dataForm" method="post" enctype="multipart/form-data">
			<div class="fitem">
                <input class="easyui-filebox" name="file" data-options="prompt:'点击按钮选择文件...',buttonText:'选择文件...'" style="width:100%">
            </div>
		</form>
    </div>
    <script type="text/javascript">
	    var loadi,url,index = parent.layer.getFrameIndex(window.name);
	    function submitInfo(){
	    	url = '${ctx}/file/fileUpload'
	        $('#dataForm').form('submit',{
	            url: url,
	            success: function(data){
	            	parent.layer.close(loadi);
	                cleanErrMsg();
	            	var data = eval('(' + data + ')');
	            	if (data.success==TRUE){
	            		parent.reloadData();
	                	parent.layer.msg(data.message, {offset: 'rb',icon: 6,shift: 8,time: 5000});
	            		parent.layer.close(index);
	                } else {
	                	parent.layer.msg(data.message, {offset: 'rb',icon: 5,shift: 8,time: 5000});
	                }
	            },
	            error: function(){
	                parent.layer.msg("操作失败！", {offset: 'rb',icon: 6,shift: 8,time: 5000});
	            }
	        });
	    }
    </script>
  </body>
</html>
